#! gmake

#
#  Brian Curless
#  
#  Computer Graphics Laboratory
#  Stanford University
#  
#  ---------------------------------------------------------------------
#  
#  Copyright (1997) The Board of Trustees of the Leland Stanford Junior
#  University. Except for commercial resale, lease, license or other
#  commercial transactions, permission is hereby given to use, copy,
#  modify this software for academic purposes only.  No part of this
#  software or any derivatives thereof may be used in the production of
#  computer models for resale or for use in a commercial
#  product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
#  CONCERNING THIS SOFTWARE.  No support is implied or provided.
#  

# Make all subdirectories
# Requires gnu make (e.g. /usr/common/bin/make)
# Run "make install" to make clobber, depend, all

SUBDIRS = \
	include \
	src \
	lib \
	bin \

default:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) default); done

clean:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done
	rm -f src/vrip/vriphead src/vrip/vrip src/pvrip/plycullmaxx src/pvrip/plymerge src/plytools/plydice src/plytools/ply2verts src/plytools/plybbox src/plytools/plybound src/plytools/plynormals src/plytools/plycrunch src/plytools/plyplanecrop src/plytools/plysubtract src/plytools/plyremove src/plytools/plystrip src/plytools/plyhead src/plytools/plyconfthresh src/plytools/plyvolume src/plytools/plyconfcrop src/plytools/xyz2ply src/plytools/plyflip src/plytools/plyxform src/plytools/plysubdiv src/plytools/plyaddinfo src/plytools/plyshared src/plytools/plyarea src/plytools/plyunshared src/plytools/plymirror src/plytools/plycomps src/plyclean/pch/vripmarch src/plyclean/plyclean src/march/vripmarch


clobber:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) clobber); done
	cd include; make
	cd lib; make

depend:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) depend); done

install:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done

all:
	@for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done

tar:
	cd .. && tar zcvf vrip_plytools_src.tar.gz `find ply -name CVS -prune -o -type f -print`
